import type { FormInstance } from 'element-plus'
import { IArticle, IList } from '@/interface'
import { ref } from 'vue'

export class InitData {
  articleList: IArticle[] = []

  articleParams: IList = {
    orderName: 'created_at',
    orderBy: 'desc',
    types: '',
    nowPage: 1,
    pageSize: 20
  }

  articleFormRef = ref<FormInstance>()

  waterfallParams = {
    column: 3,
    gap: 20
  }

  hasMore: boolean = true

  offsetList: any = []
  isLoading: boolean = true
  isBottom: boolean = false // 是否触底
  isFirst: boolean = true // 是否初次加载
}
